(function() {
var o=!0,q=null,u=!1;function C(){return function(){}}
(function(t){function k(){}function g(){}function E(a,c,e){var f,d="mixpanel"===e?t:t[e];if(d&&!b.isArray(d))s.error("You have already initialized "+e);else return f=new g,f.J(a,c,e),f.people=new k,f.people.J(f),A=A||f.d("debug"),b.e(d)||(f.G.call(f.people,d.people),f.G(d)),f}function l(a){this.props={};this.ca=u;this.name=a.cookie_name?"mp_"+a.cookie_name:"mp_"+a.token+"_mixpanel";this.load();this.ta(a);this.cb(a);this.save()}function F(){this.na="submit"}function B(){this.na="click"}function w(){}
function x(){if(!x.Ha)J=x.Ha=o,K=u,b.a(y,function(a){a.xa()})}var I=Array.prototype,z=Object.prototype,L=I.slice,D=z.toString,G=z.hasOwnProperty,v=window.console,M=window.navigator,r=window.document,n=M.userAgent,O=["__mps","__mpa","__mpap","$people_distinct_id"],z=t&&t.__SV||0,H=window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,K=!H&&-1==n.indexOf("MSIE"),b={},A=u,P={api_host:("https:"==r.location.protocol?"https://":"http://")+"api.mixpanel.com",cross_subdomain_cookie:o,cookie_name:"",
loaded:C(),store_google:o,save_referrer:o,test:u,verbose:u,img:u,track_pageview:o,debug:u,track_links_timeout:300,cookie_expiration:365,upgrade:u,disable_cookie:u,ip:o},J=u;(function(){var a=I.forEach,c=I.indexOf,e=Array.isArray,f={},d=b.a=function(c,e,b){if(c!=q)if(a&&c.forEach===a)c.forEach(e,b);else if(c.length===+c.length)for(var d=0,g=c.length;d<g&&!(d in c&&e.call(b,c[d],d,c)===f);d++);else for(d in c)if(G.call(c,d)&&e.call(b,c[d],d,c)===f)break};b.extend=function(a){d(L.call(arguments,1),function(c){for(var e in c)void 0!==
c[e]&&(a[e]=c[e])});return a};b.isArray=e||function(a){return"[object Array]"===D.call(a)};b.Pa=function(a){try{return/^\s*\bfunction\b/.test(a)}catch(c){return u}};b.Ma=function(a){return!(!a||!G.call(a,"callee"))};b.o=function(a){return!a?[]:a.o?a.o():b.isArray(a)||b.Ma(a)?L.call(a):b.fb(a)};b.fb=function(a){var c=[];if(a==q)return c;d(a,function(a){c[c.length]=a});return c};b.hb=function(a){return a};b.ha=function(a,e){var b=u;if(a==q)return b;if(c&&a.indexOf===c)return-1!=a.indexOf(e);d(a,function(a){if(b||
(b=a===e))return f});return b};b.h=function(a,c){return-1!==a.indexOf(c)}})();b.ja=function(a,c){a.prototype=new c;a.Ya=c.prototype};b.g=function(a){return a===Object(a)&&!b.isArray(a)};b.W=function(a){if(b.g(a)){for(var c in a)if(G.call(a,c))return u;return o}return u};b.e=function(a){return void 0===a};b.ka=function(a){return"[object String]"==D.call(a)};b.Oa=function(a){return"[object Date]"==D.call(a)};b.Qa=function(a){return"[object Number]"==D.call(a)};b.fa=function(a){b.a(a,function(c,e){b.Oa(c)?
a[e]=b.Ia(c):b.g(c)&&(a[e]=b.fa(c))});return a};b.Ia=function(a){function c(a){return 10>a?"0"+a:a}return a.getUTCFullYear()+"-"+c(a.getUTCMonth()+1)+"-"+c(a.getUTCDate())+"T"+c(a.getUTCHours())+":"+c(a.getUTCMinutes())+":"+c(a.getUTCSeconds())};b.A=function(a){var c={};b.a(a,function(a,f){b.ka(a)&&0<a.length&&(c[f]=a)});return c};b.truncate=function(a,c){var e;"string"===typeof a?e=a.slice(0,c):b.isArray(a)?(e=[],b.a(a,function(a){e.push(b.truncate(a,c))})):b.g(a)?(e={},b.a(a,function(a,d){e[d]=
b.truncate(a,c)})):e=a;return e};b.q=function(){return function(a){function c(a,b){var i="",j=0,h=j="",h=0,g=i,m=[],p=b[a];p&&"object"===typeof p&&"function"===typeof p.toJSON&&(p=p.toJSON(a));switch(typeof p){case "string":return e(p);case "number":return isFinite(p)?""+p:"null";case "boolean":case "null":return""+p;case "object":if(!p)return"null";i+="    ";m=[];if("[object Array]"===D.apply(p)){h=p.length;for(j=0;j<h;j+=1)m[j]=c(j,p)||"null";return h=0===m.length?"[]":i?"[\n"+i+m.join(",\n"+i)+
"\n"+g+"]":"["+m.join(",")+"]"}for(j in p)G.call(p,j)&&(h=c(j,p))&&m.push(e(j)+(i?": ":":")+h);return h=0===m.length?"{}":i?"{"+m.join(",")+""+g+"}":"{"+m.join(",")+"}"}}function e(a){var c=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};c.lastIndex=0;return c.test(a)?'"'+a.replace(c,function(a){var c=e[a];return"string"===typeof c?c:"\\u"+
("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}return c("",{"":a})}}();b.B=function(){function a(){switch(h){case "t":return d("t"),d("r"),d("u"),d("e"),o;case "f":return d("f"),d("a"),d("l"),d("s"),d("e"),u;case "n":return d("n"),d("u"),d("l"),d("l"),q}i("Unexpected '"+h+"'")}function c(){for(;h&&" ">=h;)d()}function e(){var a,c,e="",b;if('"'===h)for(;d();){if('"'===h)return d(),e;if("\\"===h)if(d(),"u"===h){for(c=b=0;4>c;c+=1){a=parseInt(d(),16);if(!isFinite(a))break;b=16*b+a}e+=
String.fromCharCode(b)}else if("string"===typeof g[h])e+=g[h];else break;else e+=h}i("Bad string")}function b(){var a;a="";"-"===h&&(a="-",d("-"));for(;"0"<=h&&"9">=h;)a+=h,d();if("."===h)for(a+=".";d()&&"0"<=h&&"9">=h;)a+=h;if("e"===h||"E"===h){a+=h;d();if("-"===h||"+"===h)a+=h,d();for(;"0"<=h&&"9">=h;)a+=h,d()}a=+a;if(isFinite(a))return a;i("Bad number")}function d(a){a&&a!==h&&i("Expected '"+a+"' instead of '"+h+"'");h=m.charAt(j);j+=1;return h}function i(a){throw{name:"SyntaxError",message:a,
gb:j,text:m};}var j,h,g={'"':'"',"\\":"\\","/":"/",b:"\u0008",f:"\u000c",n:"\n",r:"\r",t:"\t"},m,p;p=function(){c();switch(h){case "{":var j;a:{var g,m={};if("{"===h){d("{");c();if("}"===h){d("}");j=m;break a}for(;h;){g=e();c();d(":");Object.hasOwnProperty.call(m,g)&&i('Duplicate key "'+g+'"');m[g]=p();c();if("}"===h){d("}");j=m;break a}d(",");c()}}i("Bad object")}return j;case "[":a:{j=[];if("["===h){d("[");c();if("]"===h){d("]");g=j;break a}for(;h;){j.push(p());c();if("]"===h){d("]");g=j;break a}d(",");
c()}}i("Bad array")}return g;case '"':return e();case "-":return b();default:return"0"<=h&&"9">=h?b():a()}};return function(a){m=a;j=0;h=" ";a=p();c();h&&i("Syntax error");return a}}();b.ba=function(a){var c,e,f,d,i=0,j=0,h="",h=[];if(!a)return a;a=b.eb(a);do c=a.charCodeAt(i++),e=a.charCodeAt(i++),f=a.charCodeAt(i++),d=c<<16|e<<8|f,c=d>>18&63,e=d>>12&63,f=d>>6&63,d&=63,h[j++]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(c)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e)+
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(d);while(i<a.length);h=h.join("");switch(a.length%3){case 1:h=h.slice(0,-2)+"==";break;case 2:h=h.slice(0,-1)+"="}return h};b.eb=function(a){var a=(a+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n"),c="",e,b,d=0,i;e=b=0;d=a.length;for(i=0;i<d;i++){var j=a.charCodeAt(i),h=q;128>j?b++:h=127<j&&2048>j?String.fromCharCode(j>>6|192,j&63|128):String.fromCharCode(j>>
12|224,j>>6&63|128,j&63|128);h!==q&&(b>e&&(c+=a.substring(e,b)),c+=h,e=b=i+1)}b>e&&(c+=a.substring(e,a.length));return c};b.wa=function(){function a(){function a(c,e){var b,d=0;for(b=0;b<e.length;b++)d|=i[b]<<8*b;return c^d}var c,b,i=[],j=0;for(c=0;c<n.length;c++)b=n.charCodeAt(c),i.unshift(b&255),4<=i.length&&(j=a(j,i),i=[]);0<i.length&&(j=a(j,i));return j.toString(16)}function c(){for(var a=1*new Date,c=0;a==1*new Date;)c++;return a.toString(16)+c.toString(16)}return function(){var b=(screen.height*
screen.width).toString(16);return c()+"-"+Math.random().toString(16).replace(".","")+"-"+a()+"-"+b+"-"+c()}}();b.Na=function(){return/(google web preview|baiduspider|yandexbot)/i.test(n)?o:u};b.va=function(a){var c,e,f,d=[];"undefined"===typeof c&&(c="&");b.a(a,function(a,c){e=encodeURIComponent(a.toString());f=encodeURIComponent(c);d[d.length]=f+"="+e});return d.join(c)};b.ga=function(a,c){var c=c.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),b=RegExp("[\\?&]"+c+"=([^&#]*)").exec(a);return b===q||
b&&"string"!==typeof b[1]&&b[1].length?"":decodeURIComponent(b[1]).replace(/\+/g," ")};b.cookie={get:function(a){for(var a=a+"=",c=r.cookie.split(";"),b=0;b<c.length;b++){for(var f=c[b];" "==f.charAt(0);)f=f.substring(1,f.length);if(0==f.indexOf(a))return decodeURIComponent(f.substring(a.length,f.length))}return q},parse:function(a){var c;try{c=b.B(b.cookie.get(a))||{}}catch(e){}return c},set:function(a,c,b,f){var e;var d="",i="";f&&(e=(d=(d=r.location.hostname.match(/[a-z0-9][a-z0-9\-]+\.[a-z\.]{2,6}$/i))?
d[0]:"")?"; domain=."+d:"",d=e);b&&(i=new Date,i.setTime(i.getTime()+864E5*b),i="; expires="+i.toGMTString());r.cookie=a+"="+encodeURIComponent(c)+i+"; path=/"+d},remove:function(a,c){b.cookie.set(a,"",-1,c)}};b.pa=function(){function a(a,f,d){return function(i){if(i=i||c(window.event)){var j=o,h;b.Pa(d)&&(h=d(i));i=f.call(a,i);if(u===h||u===i)j=u;return j}}}function c(a){if(a)a.preventDefault=c.preventDefault,a.stopPropagation=c.stopPropagation;return a}c.preventDefault=function(){this.returnValue=
u};c.stopPropagation=function(){this.cancelBubble=o};return function(c,b,d,i){c?c.addEventListener&&!i?c.addEventListener(b,d,u):(b="on"+b,c[b]=a(c,d,c[b])):s.error("No valid element provided to register_event")}}();b.Ga=function(){function a(a,b){return 0<=(" "+a.className+" ").replace(c," ").indexOf(" "+b+" ")}var c=/[\t\r\n]/g;return function(c){if(!r.getElementsByTagName)return[];for(var c=c.split(" "),f,d=Array(r),i=0;i<c.length;i++)if(f=c[i].replace(/^\s+/,"").replace(/\s+$/,""),-1<f.indexOf("#")){f=
f.split("#");var j=f[0],d=r.getElementById(f[1]);if(!d||j&&d.nodeName.toLowerCase()!=j)return[];d=Array(d)}else if(-1<f.indexOf(".")){f=f.split(".");var j=f[0],h=f[1];j||(j="*");f=[];for(var g=0,m=0;m<d.length;m++){var p;p="*"==j?d[m].all?d[m].all:d[m].getElementsByTagName("*"):d[m].getElementsByTagName(j);for(var k=0;k<p.length;k++)f[g++]=p[k]}d=[];for(g=j=0;g<f.length;g++)f[g].className&&b.ka(f[g].className)&&a(f[g],h)&&(d[j++]=f[g])}else if(f.match(/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/)){var j=
RegExp.$1,l=RegExp.$2,h=RegExp.$3,n=RegExp.$4;j||(j="*");f=[];for(m=g=0;m<d.length;m++){p="*"==j?d[m].all?d[m].all:d[m].getElementsByTagName("*"):d[m].getElementsByTagName(j);for(k=0;k<p.length;k++)f[g++]=p[k]}d=[];j=0;switch(h){case "=":h=function(a){return a.getAttribute(l)==n};break;case "~":h=function(a){return a.getAttribute(l).match(RegExp("\\b"+n+"\\b"))};break;case "|":h=function(a){return a.getAttribute(l).match(RegExp("^"+n+"-?"))};break;case "^":h=function(a){return 0==a.getAttribute(l).indexOf(n)};
break;case "$":h=function(a){return a.getAttribute(l).lastIndexOf(n)==a.getAttribute(l).length-n.length};break;case "*":h=function(a){return-1<a.getAttribute(l).indexOf(n)};break;default:h=function(a){return a.getAttribute(l)}}d=[];for(g=j=0;g<f.length;g++)h(f[g])&&(d[j++]=f[g])}else{j=f;f=[];for(m=g=0;m<d.length;m++){p=d[m].getElementsByTagName(j);for(k=0;k<p.length;k++)f[g++]=p[k]}d=f}return d}}();b.info={Ba:function(){var a="",c={};b.a("utm_source utm_medium utm_campaign utm_content utm_term".split(" "),
function(e){a=b.ga(r.URL,e);a.length&&(c[e]=a)});return c},Ua:function(a){return 0===a.search("https?://(.*)google.([^/?]*)")?"google":0===a.search("https?://(.*)bing.com")?"bing":0===a.search("https?://(.*)yahoo.com")?"yahoo":0===a.search("https?://(.*)duckduckgo.com")?"duckduckgo":q},Va:function(a){var c=b.info.Ua(a),e={};if(c!==q)e.$search_engine=c,a=b.ga(a,"yahoo"!=c?"q":"p"),a.length&&(e.mp_keyword=a);return e},P:function(){var a=M.vendor||"";return window.opera?b.h(n,"Mini")?"Opera Mini":"Opera":
/(BlackBerry|PlayBook|BB10)/i.test(n)?"BlackBerry":b.h(n,"Chrome")?"Chrome":b.h(a,"Apple")?b.h(n,"Mobile")?"Mobile Safari":"Safari":b.h(n,"Android")?"Android Mobile":b.h(n,"Konqueror")?"Konqueror":b.h(n,"Firefox")?"Firefox":b.h(n,"MSIE")?"Internet Explorer":b.h(n,"Gecko")?"Mozilla":""},X:function(){return/Windows/i.test(n)?/Phone/.test(n)?"Windows Mobile":"Windows":/(iPhone|iPad|iPod)/.test(n)?"iOS":/Android/.test(n)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(n)?"BlackBerry":/Mac/i.test(n)?"Mac OS X":
/Linux/.test(n)?"Linux":""},Ea:function(){return/iPhone/.test(n)?"iPhone":/iPad/.test(n)?"iPad":/iPod/.test(n)?"iPod Touch":/(BlackBerry|PlayBook|BB10)/i.test(n)?"BlackBerry":/Windows Phone/i.test(n)?"Windows Phone":/Android/.test(n)?"Android":""},oa:function(a){a=a.split("/");return 3<=a.length?a[2]:""},z:function(){return b.A({$os:b.info.X(),$browser:b.info.P(),$referrer:r.referrer,$referring_domain:b.info.oa(r.referrer),$device:b.info.Ea(),mp_lib:"web"})},Ta:function(){return b.A({$os:b.info.X(),
$browser:b.info.P()})},Sa:function(a){return b.A({mp_page:a,mp_referrer:r.referrer,mp_browser:b.info.P(),mp_platform:b.info.X()})}};var s={log:function(){if(A&&!b.e(v)&&v)try{v.log.apply(v,arguments)}catch(a){b.a(arguments,function(a){v.log(a)})}},error:function(){if(A&&!b.e(v)&&v){var a=["Mixpanel error:"].concat(b.o(arguments));try{v.error.apply(v,a)}catch(c){b.a(a,function(a){v.error(a)})}}},da:function(){if(!b.e(v)&&v){var a=["Mixpanel error:"].concat(b.o(arguments));try{v.error.apply(v,a)}catch(c){b.a(a,
function(a){v.error(a)})}}}};w.prototype.w=C();w.prototype.R=C();w.prototype.O=C();w.prototype.V=function(a){this.la=a;return this};w.prototype.p=function(a,c,e,f){var d=this,i=b.Ga(a);if(0==i.length)s.error("The DOM query ("+a+") returned 0 elements");else return b.a(i,function(a){b.pa(a,this.na,function(a){var b={},i=d.w(e,this),g=d.la.d("track_links_timeout");d.R(a,this,b);window.setTimeout(d.ra(f,i,b,o),g);d.la.p(c,i,d.ra(f,i,b))})},this),o};w.prototype.ra=function(a,c,b,f){var f=f||u,d=this;
return function(){if(!b.Aa)b.Aa=o,a&&a(f,c)===u||d.O(c,b,f)}};w.prototype.w=function(a,c){return"function"===typeof a?a(c):b.extend({},a)};b.ja(B,w);B.prototype.w=function(a,c){var b=B.Ya.w.apply(this,arguments);if(c.href)b.url=c.href;return b};B.prototype.R=function(a,c,b){b.ma=2===a.which||a.metaKey||"_blank"===c.target;b.href=c.href;b.ma||a.preventDefault()};B.prototype.O=function(a,c){c.ma||setTimeout(function(){window.location=c.href},0)};b.ja(F,w);F.prototype.R=function(a,c,b){b.element=c;a.preventDefault()};
F.prototype.O=function(a,c){setTimeout(function(){c.element.submit()},0)};l.prototype.z=function(){var a={};b.a(this.props,function(c,e){b.ha(O,e)||(a[e]=c)});return a};l.prototype.load=function(){if(!this.disabled){var a=b.cookie.parse(this.name);a&&(this.props=b.extend({},a))}};l.prototype.cb=function(a){var c=a.upgrade,e;if(c)e="mp_super_properties","string"===typeof c&&(e=c),c=b.cookie.parse(e),b.cookie.remove(e),b.cookie.remove(e,o),c&&(this.props=b.extend(this.props,c.all,c.events));if(!a.cookie_name&&
"mixpanel"!==a.name&&(e="mp_"+a.token+"_"+a.name,c=b.cookie.parse(e)))b.cookie.remove(e),b.cookie.remove(e,o),this.j(c)};l.prototype.save=function(){this.disabled||b.cookie.set(this.name,b.q(this.props),this.S,this.Q)};l.prototype.remove=function(){b.cookie.remove(this.name,u);b.cookie.remove(this.name,o)};l.prototype.clear=function(){this.remove();this.props={}};l.prototype.j=function(a,c,e){return b.g(a)?("undefined"===typeof c&&(c="None"),this.S="undefined"===typeof e?this.ea:e,b.a(a,function(a,
b){if(!this.props[b]||this.props[b]===c)this.props[b]=a},this),this.save(),o):u};l.prototype.m=function(a,c){return b.g(a)?(this.S="undefined"===typeof c?this.ea:c,b.extend(this.props,a),this.save(),o):u};l.prototype.Y=function(a){a in this.props&&(delete this.props[a],this.save())};l.prototype.bb=function(){if(!this.ca)this.j(b.info.Ba()),this.ca=o};l.prototype.ua=function(a){this.m(b.info.Va(a))};l.prototype.Z=function(a){this.j({$initial_referrer:a||"$direct",$initial_referring_domain:b.info.oa(a)||
"$direct"},"")};l.prototype.Ka=function(){return b.A({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})};l.prototype.ta=function(a){this.ea=this.S=a.cookie_expiration;this.Xa(a.disable_cookie);this.Wa(a.cross_subdomain_cookie)};l.prototype.Xa=function(a){(this.disabled=a)&&this.remove()};l.prototype.Wa=function(a){if(a!==this.Q)this.Q=a,this.remove(),this.save()};l.prototype.Ja=function(){return this.Q};l.prototype.k=function(a,c){var e=
this.I(a),f=c[a],d=this.H("$set"),i=this.H("$add"),g=this.H("$append",[]);"__mps"===e?(b.extend(d,f),this.L("$add",f)):"__mpa"===e?b.a(f,function(a,c){c in d?d[c]+=a:(c in i||(i[c]=0),i[c]+=a)},this):"__mpap"===e&&g.push(f);s.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):");s.log(c);this.save()};l.prototype.L=function(a,c){var e=this.v(a);b.e(e)||(b.a(c,function(a,c){delete e[c]},this),this.save())};l.prototype.I=function(a){if("$set"===a)return"__mps";if("$add"===a)return"__mpa";if("$append"===
a)return"__mpap";s.error("Invalid queue:",a)};l.prototype.v=function(a){return this.props[this.I(a)]};l.prototype.H=function(a,c){var e=this.I(a),c=b.e(c)?{}:c;return this.props[e]||(this.props[e]=c)};g.prototype.V=function(a,c,b){if("undefined"===typeof b)s.error("You must name your new library: init(token, config, name)");else if("mixpanel"===b)s.error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");else return a=E(a,c,b),t[b]=a,a.K(),a};g.prototype.J=
function(a,c,e){this.__loaded=o;this.config={};this.qa(b.extend({},P,c,{name:e,token:a,callback_fn:("mixpanel"===e?e:"mixpanel."+e)+"._jsc"}));this._jsc=C();this.D=[];this.F=[];this.C=[];this.s={disable_all_events:u,identify_called:u};this.cookie=new l(this.config)};g.prototype.K=function(){this.d("loaded")(this);this.d("track_pageview")&&this.sa()};g.prototype.xa=function(){b.a(this.D,function(a){this.N.apply(this,a)},this);b.a(this.F,function(a){this.i.apply(this,a)},this);delete this.D;delete this.F};
g.prototype.N=function(a,c){if(this.d("img"))return s.error("You can't use DOM tracking functions with img = true."),u;if(!J)return this.D.push([a,c]),u;var b=(new a).V(this);return b.p.apply(b,c)};g.prototype.aa=function(a,c){if(b.e(a))return q;if(H)return function(b){a(b,c)};var e=this._jsc,f=""+Math.floor(1E8*Math.random()),d=this.d("callback_fn")+'["'+f+'"]';e[f]=function(b){delete e[f];a(b,c)};return d};g.prototype.i=function(a,c,e){if(K)this.F.push(arguments);else{var f=this.d("verbose");this.d("test")&&
(c.test=1);f&&(c.verbose=1);this.d("img")&&(c.img=1);e&&!H&&(c.callback=e);c.ip=this.d("ip")?1:0;c._=(new Date).getTime().toString();a+="?"+b.va(c);if("img"in c){var d=r.createElement("img");d.src=a;r.body.appendChild(d)}else if(H){var i=new XMLHttpRequest;i.open("GET",a,o);i.withCredentials=o;i.onreadystatechange=function(){if(4===i.readyState)if(200===i.status)e&&(f?e(b.B(i.responseText)):e(Number(i.responseText)));else{var a="Bad HTTP status: "+i.status+" "+i.statusText;s.error(a);e&&(f?e({status:0,
error:a}):e(0))}};i.send(q)}else{d=r.createElement("script");d.type="text/javascript";d.async=o;d.defer=o;d.src=a;var g=r.getElementsByTagName("script")[0];g.parentNode.insertBefore(d,g)}}};g.prototype.G=function(a){function c(a,c){b.a(a,function(a){this[a[0]].apply(this,a.slice(1))},c)}var e,f=[],d=[];b.a(a,function(a){a&&(e=a[0],"function"===typeof a?a.call(this):b.isArray(a)&&-1!=e.indexOf("track")&&"function"===typeof this[e]?d.push(a):f.push(a))},this);c(f,this);c(d,this)};g.prototype.push=function(a){this.G([a])};
g.prototype.disable=function(a){"undefined"===typeof a?this.s.Fa=o:this.C=this.C.concat(a)};g.prototype.p=function(a,c,e){if("undefined"===typeof a)s.error("No event name provided to mixpanel.track");else if(b.Na()||this.s.Fa||b.ha(this.C,a))"undefined"!==typeof e&&e(0);else return c=c||{},c.token=c.ib||this.d("token"),this.j({distinct_id:b.wa()},""),this.cookie.ua(r.referrer),this.d("store_google")&&this.cookie.bb(),this.d("save_referrer")&&this.cookie.Z(r.referrer),c=b.extend({},b.info.z(),this.cookie.z(),
c),a=b.truncate({event:a,properties:c},255),c=b.q(a),c=b.ba(c),s.log("MIXPANEL REQUEST:"),s.log(a),this.i(this.d("api_host")+"/track/",{data:c},this.aa(e,a)),a};g.prototype.sa=function(a){if("undefined"===typeof a)a=r.location.href;this.p("mp_page_view",b.info.Sa(a))};g.prototype.ab=function(){return this.N.call(this,B,arguments)};g.prototype.$a=function(){return this.N.call(this,F,arguments)};g.prototype.m=function(a,c){this.cookie.m(a,c)};g.prototype.j=function(a,c,b){this.cookie.j(a,c,b)};g.prototype.Y=
function(a){this.cookie.Y(a)};g.prototype.M=function(a,b){var e={};e[a]=b;this.m(e)};g.prototype.U=function(a){this.M("distinct_id",a)};g.prototype.l=function(){return this.T("distinct_id")};g.prototype.Ra=function(a){this.M("mp_name_tag",a)};g.prototype.qa=function(a){b.g(a)&&(b.extend(this.config,a),this.cookie&&this.cookie.ta(this.config),A=A||this.d("debug"))};g.prototype.d=function(a){return this.config[a]};g.prototype.T=function(a){return this.cookie.props[a]};g.prototype.toString=function(){var a=
this.d("name");"mixpanel"!==a&&(a="mixpanel."+a);return a};k.prototype.J=function(a){this.c=a};k.prototype.U=function(a,c,e,f){var d=this.c.l();!b.e(d)&&d!==q&&d!==a&&this.set({$events_distinct_id:d});this.c.s.La=o;this.c.M("$people_distinct_id",a);this.za(c,e,f)};k.prototype.set=function(a,c,e){var f={},d={};b.g(a)?(b.a(a,function(a,b){"$distinct_id"==b||"$token"==b||(d[b]=a)}),e=c):d[a]=c;this.u("save_referrer")&&this.c.cookie.Z(r.referrer);d=b.extend({},b.info.Ta(),this.c.cookie.Ka(),d);f.$set=
d;return this.i(f,e)};k.prototype.ia=function(a,c,e){var f={},d={};b.g(a)?(b.a(a,function(a,b){"$distinct_id"==b||"$token"==b||(isNaN(parseFloat(a))?s.error("Invalid increment value passed to mixpanel.people.increment - must be a number"):d[b]=a)}),e=c):(b.e(c)&&(c=1),d[a]=c);f.$add=d;return this.i(f,e)};k.prototype.append=function(a,c,e){var f={},d={};b.g(a)?(b.a(a,function(a,b){"$distinct_id"==b||"$token"==b||(d[b]=a)}),e=c):d[a]=c;f.$append=d;return this.i(f,e)};k.prototype.Za=function(a,c,e){if(!b.Qa(a)&&
(a=parseFloat(a),isNaN(a))){s.error("Invalid value passed to mixpanel.people.track_charge - must be a number");return}return this.append("$transactions",b.extend({$amount:a},c),e)};k.prototype.Ca=function(a){return this.set("$transactions",[],a)};k.prototype.Da=function(){if(this.$())return this.i({$delete:this.l()});s.error("mixpanel.people.delete_user() requires you to call identify() first")};k.prototype.toString=function(){return this.c.toString()+".people"};k.prototype.i=function(a,c){a.$token=
this.u("token");a.$distinct_id=this.l();var e=b.fa(a),f=b.truncate(e,255),e=b.q(e),e=b.ba(e);if(!this.$())return this.ya(a),b.e(c)||(this.u("verbose")?c({status:-1,error:q}):c(-1)),f;s.log("MIXPANEL PEOPLE REQUEST:");s.log(f);this.c.i(this.u("api_host")+"/engage/",{data:e},this.c.aa(c,f));return f};k.prototype.u=function(a){return this.c.d(a)};k.prototype.$=function(){return this.c.s.La===o};k.prototype.l=function(){return this.c.T("$people_distinct_id")};k.prototype.ya=function(a){"$set"in a?this.c.cookie.k("$set",
a):"$add"in a?this.c.cookie.k("$add",a):"$append"in a?this.c.cookie.k("$append",a):s.error("Invalid call to _enqueue():",a)};k.prototype.za=function(a,c,e){var f=this,d=b.extend({},this.c.cookie.v("$set")),g=b.extend({},this.c.cookie.v("$add")),j=this.c.cookie.v("$append");!b.e(d)&&b.g(d)&&!b.W(d)&&(f.c.cookie.L("$set",d),this.set(d,function(c,e){0==c&&f.c.cookie.k("$set",d);b.e(a)||a(c,e)}));!b.e(g)&&b.g(g)&&!b.W(g)&&(f.c.cookie.L("$add",g),this.ia(g,function(a,d){0==a&&f.c.cookie.k("$add",g);b.e(c)||
c(a,d)}));if(!b.e(j)&&b.isArray(j)&&j.length){for(var h=j.length-1;0<=h;h--){var k=j.pop();f.append(k,function(a,c){0==a&&f.c.cookie.k("$append",k);b.e(e)||e(a,c)})}f.c.cookie.save()}};b.toArray=b.o;b.isObject=b.g;b.JSONEncode=b.q;b.JSONDecode=b.B;b.isEmptyObject=b.W;g.prototype.init=g.prototype.V;g.prototype.disable=g.prototype.disable;g.prototype.track=g.prototype.p;g.prototype.track_links=g.prototype.ab;g.prototype.track_forms=g.prototype.$a;g.prototype.track_pageview=g.prototype.sa;g.prototype.register=
g.prototype.m;g.prototype.register_once=g.prototype.j;g.prototype.unregister=g.prototype.Y;g.prototype.identify=g.prototype.U;g.prototype.name_tag=g.prototype.Ra;g.prototype.set_config=g.prototype.qa;g.prototype.get_config=g.prototype.d;g.prototype.get_property=g.prototype.T;g.prototype.get_distinct_id=g.prototype.l;g.prototype.toString=g.prototype.toString;l.prototype.properties=l.prototype.z;l.prototype.update_search_keyword=l.prototype.ua;l.prototype.update_referrer_info=l.prototype.Z;l.prototype.get_cross_subdomain=
l.prototype.Ja;l.prototype.clear=l.prototype.clear;k.prototype.set=k.prototype.set;k.prototype.increment=k.prototype.ia;k.prototype.append=k.prototype.append;k.prototype.track_charge=k.prototype.Za;k.prototype.clear_charges=k.prototype.Ca;k.prototype.delete_user=k.prototype.Da;k.prototype.identify=k.prototype.U;k.prototype.get_distinct_id=k.prototype.l;k.prototype.toString=k.prototype.toString;if(b.e(t))s.da("'mixpanel' object not initialized. Ensure you are using the latest version of the Mixpanel JS Library along with the snippet we provide.");
else if(t.__loaded||t.config&&t.cookie)s.error("Mixpanel library has already been downloaded at least once.");else if(1.1>z)s.da("Version mismatch; please ensure you're using the latest version of the Mixpanel code snippet.");else{var y={};b.a(t._i,function(a){var c;a&&b.isArray(a)&&(c=a[a.length-1],a=E.apply(this,a),y[c]=a)});var Q=function(){b.a(y,function(a,b){"mixpanel"!==b&&(t[b]=a)});t._=b};t.init=function(a,b,e){e?t[e]||(t[e]=y[e]=E(a,b,e),t[e].K()):(e=t,y.mixpanel?e=y.mixpanel:a&&(e=E(a,b,
"mixpanel")),window.mixpanel=t=e,Q())};t.init();b.a(y,function(a){a.K()});if(r.addEventListener)"complete"==r.readyState?x():r.addEventListener("DOMContentLoaded",x,u);else if(r.attachEvent){r.attachEvent("onreadystatechange",x);z=u;try{z=window.frameElement==q}catch(R){}if(r.documentElement.doScroll&&z){var N=function(){try{r.documentElement.doScroll("left")}catch(a){setTimeout(N,1);return}x()};N()}}b.pa(window,"load",x,o)}})(window.mixpanel);
})();
